﻿using System;
using System.Reflection;

namespace Yappi.Delegates
{
    internal static class PropertyImplementerHelper
    {
        public static readonly MethodInfo GetTypeFromHandle = typeof(Type).GetMethod("GetTypeFromHandle");
        public static readonly MethodInfo GetProperty = typeof(Type).GetMethod("GetProperty", new Type[] { typeof(String) });
    }

    internal static class PropertyImplementerHelper<TBaseType>
    {
// ReSharper disable StaticFieldInGenericType
        public static readonly MethodInfo ImplementGetterMethod = typeof(IImplenemtationMap<TBaseType>)
            .GetMethod("ImplementGetter", BindingFlags.Public | BindingFlags.Instance);

        public static readonly MethodInfo ImplementSetterMethod = typeof(IImplenemtationMap<TBaseType>)
            .GetMethod("ImplementSetter", BindingFlags.Public | BindingFlags.Instance);

        public static readonly MethodInfo OverrideGetterMethod = typeof(IImplenemtationMap<TBaseType>)
            .GetMethod("OverrideGetter", BindingFlags.Public | BindingFlags.Instance);

        public static readonly MethodInfo OverrideSetterMethod = typeof(IImplenemtationMap<TBaseType>)
            .GetMethod("OverrideSetter", BindingFlags.Public | BindingFlags.Instance);
// ReSharper restore StaticFieldInGenericType
    }
}